package com.vchello.service.impl.feedback;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.vchello.bean.feedback.Feedback;
import com.vchello.dao.feedback.FeedbackDao;
import com.vchello.service.feekback.FeedbackService;


/**
 * 
 * @author power
 *
 */
@Service(value = "feedbackService")
public class FeedbackServiceImpl extends ServiceImpl<FeedbackDao, Feedback> implements FeedbackService {
	
	@Autowired
	private FeedbackDao feedbackDao;

	@Override
	public Integer saveFeedback(Feedback feedback) {
		return feedbackDao.insert(feedback);
	}

	@Override
	public List<Feedback> findFeedbackByPage(Page<Feedback> page, Feedback feedback) {
		Wrapper<Feedback> wrapper = new EntityWrapper<Feedback>(feedback);
		return feedbackDao.selectPage(page, wrapper);
	}

}
